![]() | ![]() | ![]() | ![]() |
The LENGTHN function returns incorrect results when you use it within %SYSFUNC in the fifth maintenance release of SAS 9.4 (TS1M5). The function should return a length of 0 if the value of the argument is blank. However, a length greater than 0 is being returned. This problem does not occur when you use the LENGTHN function in the DATA step.
An example of the incorrect behavior is shown in the example SAS® log output below. The LENGTHN function incorrectly returns a value of 2 when used within %SYSFUNC.
To circumvent the problem, use CALL SYMPUTX to create a macro variable instead of a %LET statement. For example:
This issue was fixed in SAS 9.4, Rev. 940_18w30.
Product Family | Product | System | SAS Release | |
Reported | Fixed* | |||
SAS System | Base SAS | Linux for x64 | 9.4 TS1M5 | 9.4 TS1M5 |
HP-UX IPF | 9.4 TS1M5 | 9.4 TS1M5 | ||
64-bit Enabled Solaris | 9.4 TS1M5 | 9.4 TS1M5 | ||
64-bit Enabled AIX | 9.4 TS1M5 | 9.4 TS1M5 | ||
Windows 7 Ultimate x64 | 9.4 TS1M5 | 9.4 TS1M5 | ||
Windows 7 Ultimate 32 bit | 9.4 TS1M5 | 9.4 TS1M5 | ||
Windows 7 Enterprise x64 | 9.4 TS1M5 | 9.4 TS1M5 | ||
Microsoft Windows Server 2016 | 9.4 TS1M5 | 9.4 TS1M5 | ||
Microsoft Windows Server 2012 Std | 9.4 TS1M5 | 9.4 TS1M5 | ||
Microsoft Windows Server 2012 R2 Std | 9.4 TS1M5 | 9.4 TS1M5 | ||
Microsoft Windows Server 2012 R2 Datacenter | 9.4 TS1M5 | 9.4 TS1M5 | ||
Microsoft Windows Server 2012 Datacenter | 9.4 TS1M5 | 9.4 TS1M5 | ||
Microsoft Windows Server 2008 for x64 | 9.4 TS1M5 | 9.4 TS1M5 | ||
Microsoft Windows Server 2008 R2 | 9.4 TS1M5 | 9.4 TS1M5 | ||
Microsoft Windows Server 2008 | 9.4 TS1M5 | 9.4 TS1M5 | ||
Microsoft Windows 10 | 9.4 TS1M5 | 9.4 TS1M5 | ||
Microsoft Windows 8.1 Pro x64 | 9.4 TS1M5 | 9.4 TS1M5 | ||
Microsoft Windows 8.1 Pro 32-bit | 9.4 TS1M5 | 9.4 TS1M5 | ||
Microsoft Windows 8.1 Enterprise x64 | 9.4 TS1M5 | 9.4 TS1M5 | ||
Microsoft Windows 8.1 Enterprise 32-bit | 9.4 TS1M5 | 9.4 TS1M5 | ||
Microsoft Windows 8 Pro x64 | 9.4 TS1M5 | 9.4 TS1M5 | ||
Microsoft Windows 8 Pro 32-bit | 9.4 TS1M5 | 9.4 TS1M5 | ||
Microsoft Windows 8 Enterprise x64 | 9.4 TS1M5 | 9.4 TS1M5 | ||
Microsoft Windows 8 Enterprise 32-bit | 9.4 TS1M5 | 9.4 TS1M5 | ||
Microsoft® Windows® for x64 | 9.4 TS1M5 | 9.4 TS1M5 | ||
z/OS 64-bit | 9.4 TS1M5 | 9.4 TS1M5 | ||
Solaris for x64 | 9.4 TS1M5 | 9.4 TS1M5 | ||
Windows 7 Professional x64 | 9.4 TS1M5 | 9.4 TS1M5 | ||
Windows 7 Professional 32 bit | 9.4 TS1M5 | 9.4 TS1M5 | ||
Windows 7 Home Premium x64 | 9.4 TS1M5 | 9.4 TS1M5 | ||
Windows 7 Home Premium 32 bit | 9.4 TS1M5 | 9.4 TS1M5 | ||
z/OS | 9.4 TS1M5 | 9.4 TS1M5 | ||
Windows 7 Enterprise 32 bit | 9.4 TS1M5 | 9.4 TS1M5 |